<?php
	$num_post 			= 1; 
	$post_type			= 'adv'; 
	$taxonomy			= 'show-on-page'; 	
	$field				= 'slug'; 
	$metakey 			= $wpdb->prefix.'display';
	$metavalue			= 'display';
	
	//require_once TEMPLATEPATH.'/controllers/isset-page.php';
	//$term				= '';
	
	$args = db_query_posts_in_terms_child_nopage($num_post, $post_type, $taxonomy, $field, $term, $metakey, $metavalue);
	query_posts($args);
	if(have_posts())
	{
		the_post();
		$postID = get_the_ID();
		$thumb_banner = db_get_post_meta($postID, $wpdb->prefix.'thumbnail');
		if($thumb_banner)
			$advImage = $thumb_banner;
	}
	require_once TEMPLATEPATH.'/views/advimage/view-adv-image.php';
	